package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.OrdOrderMapper;
import com.ruoyi.order.domain.OrdOrder;
import com.ruoyi.order.service.IOrdOrderService;

/**
 * 订单表Service业务层处理
 * 
 * @author wpf
 * @date 2023-05-19
 */
@Service
public class OrdOrderServiceImpl implements IOrdOrderService 
{
    @Autowired
    private OrdOrderMapper ordOrderMapper;

    /**
     * 查询订单表
     * 
     * @param id 订单表主键
     * @return 订单表
     */
    @Override
    public OrdOrder selectOrdOrderById(Long id)
    {
        return ordOrderMapper.selectOrdOrderById(id);
    }

    /**
     * 查询订单表列表
     * 
     * @param ordOrder 订单表
     * @return 订单表
     */
    @Override
    public List<OrdOrder> selectOrdOrderList(OrdOrder ordOrder)
    {
        return ordOrderMapper.selectOrdOrderList(ordOrder);
    }

    /**
     * 新增订单表
     * 
     * @param ordOrder 订单表
     * @return 结果
     */
    @Override
    public int insertOrdOrder(OrdOrder ordOrder)
    {
        ordOrder.setCreateTime(DateUtils.getNowDate());
        return ordOrderMapper.insertOrdOrder(ordOrder);
    }

    /**
     * 修改订单表
     * 
     * @param ordOrder 订单表
     * @return 结果
     */
    @Override
    public int updateOrdOrder(OrdOrder ordOrder)
    {
        return ordOrderMapper.updateOrdOrder(ordOrder);
    }

    /**
     * 批量删除订单表
     * 
     * @param ids 需要删除的订单表主键
     * @return 结果
     */
    @Override
    public int deleteOrdOrderByIds(Long[] ids)
    {
        return ordOrderMapper.deleteOrdOrderByIds(ids);
    }

    /**
     * 删除订单表信息
     * 
     * @param id 订单表主键
     * @return 结果
     */
    @Override
    public int deleteOrdOrderById(Long id)
    {
        return ordOrderMapper.deleteOrdOrderById(id);
    }
}
